package com.example.myapplication2;

import androidx.appcompat.app.AppCompatActivity;

import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.Button;

import com.example.myapplication2.dummy.DummyContent;

public class ItemActivityy extends AppCompatActivity
implements ItemFragment.OnListFragmentInteractionListener{
    Button button;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_item_activityy);
        getSupportFragmentManager().beginTransaction()
                .replace(R.id.frameLayout,ItemFragment.newInstance(1))
                .commit();//进行提交
      button = findViewById(R.id.button4);
      button.setOnClickListener(new View.OnClickListener() {
          @Override
          public void onClick(View v) {
              Intent intent = new Intent(ItemActivityy.this,AddItemActivity.class);
              startActivity(intent);
          }
      });
    }


    @Override
    public void onListFragmentInteraction(DummyContent.DummyItem item) {

    }
}

